{% extends 'layout.html' %}
{% load staticfiles %}


{% block content %}
    <div class="luffy-container">
        <div class="panel panel-default">
            <div class="panel-heading">{{ title }}</div>
            <div class="panel-body">
                <form method="post" novalidate>
                    {% csrf_token %}
                    {% for field in form %}
                        <div class="form-group">
                            <label class="control-label">{{ field.label }}</label>
                            <div>
                                {{ field }}
                                <span style="color: red;">{{ field.errors.0 }}</span>
                            </div>
                        </div>
                    {% endfor %}

                    <div class="col-sm-9">
                        <input class="btn btn-primary btn-sm" type="submit" value="保存并继续增加" name="_add_another">
                        <input class="btn btn-primary btn-sm" type="submit" value="保存" name="_save">
                    </div>
                </form>
            </div>
        </div>

    </div>

{% endblock %}

{% block js %}
    <script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
    <script type="text/javascript" src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
{% endblock %}